<?php
    echo doctype();
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>
            <?php
                echo $this->lang->line('manager_title_deactivate_branch');
            ?>
        </title>
        <?php
            echo link_tag('css/global.css');
            echo link_tag('css/manager.css');
        ?>
        <script type="text/javascript" src="<?php echo base_url() . 'js/jquery-1.4.4.min.js';?>"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                base_url = '<?php echo base_url(); ?>';
                $("button").click(
                    function()
                    {
                        if($('#deac_check').attr('checked'))
                        {
                            $.post(base_url + 'sync/deactivate/');
                            window.location.replace(base_url);
                        }
                        else
                        {
                            alert('Please confirm by clicking on the checkbox');
                        }
                    }
                );
            });
        </script>
    </head>
    <body>
        <div id="container">
            <div id="leftcon">
                <div id="logo"></div>
                <div id="mngr_navi">
                    <ul>
                        <li>
                            <?php
                                echo anchor('manager/', $this->lang->line('manager_todays_statistics'));
                            ?>
                        </li>
                        <li>
                            <?php
                                echo anchor('manager/agents_grid', $this->lang->line('manager_manage_agents'));
                            ?>
                        </li>
                        <li>
                            <?php
                                echo anchor('manager/unit', 'Unit');
                            ?>
                        </li>
                        <li>
                            <?php
                                echo anchor('manager/deactivate', $this->lang->line('manager_deactivate'));
                            ?>
                        </li>
                        <li>
                            <?php
                                echo anchor('logout/', $this->lang->line('manager_logout'));
                            ?>
                        </li>
                    </ul>
                </div>
            </div>
            <div id="content">
                <div id="mngr_content">
                    <h1>
                        <?php
                            echo $this->lang->line('manager_deactivate_branch');
                        ?>
                    </h1>
                    <div id="mngr_deac">
                        <div id="deac_info">
                            <?php
                                echo $this->lang->line('manager_deactivate_message');
                            ?>
                        </div>
                        <label for="deac_check">
                            <input id="deac_check" type="checkbox" />
                            <?php
                                echo $this->lang->line('manager_deactivate_confirm');
                            ?>
                        </label>
                        <button>
                            <?php
                                echo $this->lang->line('manager_deactivate_button');
                            ?>
                        </button>
                    </div>
                </div>
                <div id="footer">
                    <?php
                        echo $this->lang->line('global_copy_right');
                    ?>
                </div>
            </div>
        </div>
    </body>
</html>